package com.mymail.entity;

import java.util.ArrayList;

import com.mymail.dao.GroupDAO;

public class Group {
	private Integer id;
	private String name;
	private Integer user;
	private String other;
	//private static GroupDAO dao = new GroupDAO();

	public static GroupDAO getDAO() {
		return new GroupDAO();
	}

	public ArrayList<Contacts> getContacts(int start, int end) {
		return Contacts.getDAO().getContactsByGroupId(getId(), start, end);
	}

	public void addNewContacts(Contacts contacts) {

	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the user
	 */
	public Integer getUser() {
		return user;
	}

	/**
	 * @param user
	 *            the user to set
	 */
	public void setUser(Integer user) {
		this.user = user;
	}

	/**
	 * @return the other
	 */
	public String getOther() {
		return other;
	}

	/**
	 * @param other
	 *            the other to set
	 */
	public void setOther(String other) {
		this.other = other;
	}

}
